import java.util.Arrays;

class MyCircularQueue {
    public int[] elem;
    public int front;
    public int rear;

    /**
     * 构造方法
     *
     * @param k K个大小
     */
    public MyCircularQueue(int k) {
        elem = new int[k];
    }

    /**
     * 入队
     *
     * @param value
     * @return
     */
    public boolean enQueue(int value) {
        if (isFull()) {
            Arrays.copyOf(elem, elem.length * 2);
            elem[rear + 1] = value;
            return true;
        } else {
            elem[rear + 1] = value;
            return true;
        }
    }

    /**
     * 出队
     *
     * @return
     */
    public boolean deQueue() {
        if (isEmpty()) {
            return false;
        }
        elem[front] = 0;
        front = (front + 1) % elem.length;
        return true;

    }

    /**
     * 得到队头元素
     *
     * @return
     */
    public int Front() {
        return -1;
    }

    /**
     * 得到队尾元素
     *
     * @return
     */
    public int Rear() {
        return -1;
    }

    /**
     * 当前循环队列是否为空
     *
     * @return
     */
    public boolean isEmpty() {
        return false;
    }

    /**
     * 判断当前队列是否为满
     *
     * @return
     */
    public boolean isFull() {
        return (rear + 1) % elem.length == 0;
    }
}